<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			
			var arr=new Array("Ameria","Greece","Britain","Canada","China","Egypt");
			var count=0;
			for(var i in arr){
				 document.write(arr[i]+"<br/>");
				 
				
				if (arr[i].indexOf("a")!=-1||arr[i].indexOf("A")!=-1) {
					
					 count++;//++ 算术运算符
					
				}
				
				
			}
			 document.write("数组中共有"+count+"个单词含有a或A");
			
		</script>
	</head>
	<body>
	</body>
</html>
